#include <iostream>
#include <memory>
#include <string>
#include <vector>
using namespace std;
#include "UdpServer.hpp"
#include "Log.hpp"
#include <cstdio>

void Usage(char *head)
{
    cout << "Use Err" << endl;
    cout << head << "port" << endl;
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        return 2;
    }

    
    uint16_t port = stoi(argv[1]);

    std::unique_ptr<UdpServer> usvr(new UdpServer(port));

    usvr->Init();
    usvr->Start();

    return 0;
}